home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / tspa2540.zip / TSUNTC.TST < prev    next >
Text File  |  1990-07-14  |  1KB  |  49 lines

  1. (* This is a test program for the TSUNTC.TPU unit
  2.    Updated 19-Aug-89, 12-Nov-89, 14-Jul-90
  3. *)
  4.  
  5. uses Dos,
  6.      Crt,
  7.      TSUNTC;
  8.  
  9. procedure LOGO;
  10. begin
  11.   writeln;
  12.   writeln ('TSUNTC unit test by Prof. Timo Salmi, 14-Jul-90');
  13.   writeln ('University of Vaasa, Finland, ts@chyde.uwasa.fi');
  14.   writeln;
  15. end;  (* logo *)
  16.  
  17. (* Don't play it again, Sam *)
  18. procedure TEST1;
  19. const tune : array [1..7] of string[2]
  20.            = ('c ', 'd ', 'e ', 'f ', 'g ', 'a ', 'b ');
  21. var i : byte;
  22. begin
  23.   Delay (100);
  24.   for i := 1 to 7 do PLAYNOTE (tune[i], 4, 400);
  25.   PLAYNOTE ('c', 5, 400);
  26. end;  (* test1 *)
  27.  
  28. (* Display something in reverse *)
  29. procedure TEST2;
  30. begin
  31.   REVCOLOR;
  32.   writeln ('Display something in reverse');
  33.   REVCOLOR;
  34.   writeln ('All back to norbal :-)');
  35.   writeln ('Rats!')
  36. end;  (* test2 *)
  37.  
  38. (* Main program
  39.    If you don't want a particular test, comment it away.
  40.    Q: Why don't software firms test their programs properly themselves
  41.       but leave it to the gullible user?
  42.    A: Because it is such a testing task (do I detect audible groans :-)
  43. *)
  44. begin
  45.   LOGO;
  46.   TEST1;
  47.   TEST2;
  48. end.  (* tsuntc.tst *)
  49.